-- list is a list-style table, which use integer as index
list = {10, print, 12, "hi"}
-- we can use ipairs iterator to get each element in order
print("list: ")
for key, value in ipairs(list) do
	print(key, value)
end

-- array is a special list, that it's elements are same type
array = {1, 2, 3, 4, 5}
print("array: ")
for key, value in ipairs(array) do
	print(key, value)
end

-- sequence is a table that there is not a nil element
-- pairs iterator not gurantee the order of elements, but it make sure 
-- each element appears once 
table = {10, print, x = 12, k = "hi"}
print("table: ")
for key, value in pairs(table) do
	print(key, value)
end

-- !!!
-- pairs is unordered
-- ipairs is ordered, but just used for list-style (use integer as index)
